package job.practice.designpattern;

/**
 * Author: Zhang Dongwei
 * Date: 2023/8/27 10:32
 */
public class LazyDoubleLock {
    private volatile static LazyDoubleLock lazyDoubleLock = null;
    private LazyDoubleLock (){}

    public static LazyDoubleLock getInstance(){
        if (lazyDoubleLock == null){
            synchronized (LazyDoubleLock.class){
                if (lazyDoubleLock == null){
                    lazyDoubleLock = new LazyDoubleLock();
                }
            }
        }
        return lazyDoubleLock;
    }
}
